This patch improves error message of xm console command.
authorEwan Mellor <ewan@xensource.com>
Tue, 5 Sep 2006 16:06:01 +0000 (17:06 +0100)
committerEwan Mellor <ewan@xensource.com>
Tue, 5 Sep 2006 16:06:01 +0000 (17:06 +0100)
# xm console Domain-0
Can't specify Domain-0

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/console/client/main.c

index a43ee26463b3880e6e726e386b7210e2c2baa9d0..829d5b29644ce70e0f4686a1e11bc032db9f2607 100644 (file)
@@ -220,7 +220,8 @@ int main(int argc, char **argv)
           user friendly, we'll bail out here since no data will ever show
           up on domain-0. */
        if (domid == 0) {
-               err(errno, "Could not read tty from store");
+               fprintf(stderr, "Can't specify Domain-0\n");
+               exit(EINVAL);
        }
 
        /* Wait a little bit for tty to appear.  There is a race